/* 
 Lab 3 
 Class ID    : SE0691
 Student ID    : SE90043
 Student Name    : Nguyen Dang Thanh
 Due Date    : 16/11/2012
 I declare that this assignment is my own work 
 in accordance with FPT Policy. 
*/
package ass.data;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author vupttse
 */
public class ConnectionUtitility {
    public static Connection openConnection() throws ClassNotFoundException, SQLException{
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
        "databaseName=SMS;user=sa;password=1234;";
        Connection con = DriverManager.getConnection(connectionUrl);
        return con;
    }
}
